import request from '@/utils/request'

export function getAllDept(){
    return request({
        url: '/dept/getAllDept',
        method: 'GET'
    })
}
export function addOneDept(data){
    return request({
        url: '/dept/addOneDept',
        method: 'POST',
        data
    })
}
export function updateOneDept(data){
    return request({
        url: '/dept/updateOneDept',
        method: 'POST',
        data
    })
}
export function deleteOneDept(deptId){
    return request({
        url: '/dept/deleteOneDept',
        method: 'GET',
        params: {deptId}
    })
}
export function search(deptName){
    console.log(deptName)
    return request({
        url: '/dept/searchDeptByName',
        method: 'GET',
        params: { deptName }
    })
}